package com.yuexunit.finance.system.service;

import com.yuexunit.finance.system.entity.SignFileInfoEntity;
import com.yuexunit.inject.annotation.Implements;
import com.yuexunit.persist.PersistUtil;
import com.yuexunit.persist.annotation.Transactional;
import com.yuexunit.util.DateUtil;

/**
*@version 创建时间：2017年5月27日 下午4:12:51
*@author wenwenlong
*类说明
*/

@Implements(SignFileInfoService.class)
public class SignFileInfoServiceImpl implements SignFileInfoService {

	@Override
	@Transactional
	public String createSignFileInfo(SignFileInfoEntity entity) {
		entity.setUpdateDateTime(DateUtil.now());
		PersistUtil.insertOrUpdate(entity);
		return entity.getFileUuid();
	}

	@Override
	@Transactional
	public void updateSignFileInfo(SignFileInfoEntity entity) {
		entity.setUpdateDateTime(DateUtil.now());
		PersistUtil.update(entity);
	}

	@Override
	public SignFileInfoEntity inquireSignFileInfo(String fileUuid) {
		SignFileInfoEntity entity = PersistUtil.get(SignFileInfoEntity.class, fileUuid);
		return entity;
	}
}
